package com.belano.domain;

import java.util.ArrayList;
import java.util.List;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;

@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = { "person" })
@XmlRootElement(name = "people")
public class People {

	private static final long serialVersionUID = 1L;

	@XmlElement(name = "person")
	private List<Person> person;

	public People() {
		// empty constructor required for JAXB
	}

	public People(List<Person> person) {
		super();
		this.person = person;
	}

	public List<Person> getPerson() {
		if (person == null) {
			System.out.println("null person");
			person = new ArrayList<Person>();
		}
		return this.person;
	}

	public void setPerson(List<Person> person) {
		this.person = person;
	}

}
